package com.zzl.bonds.ticket.constant.type;

/**
 * 菜单按钮 枚举值
 *
 * @author : gull
 * @date : 2022/3/7 20:37
 */
public enum MenuButtonEnum {


    /**
     * 开立
     */
    OPEN_CHECK_BUTTON("openCheck", "去复核", "开立复核按钮"),

    OPEN_APPROVE_BUTTON("openApprove", "去审批", "开立，平台审批按钮"),

    OPEN_SIGN_BUTTON("openSign", "去签收", "开立签收按钮"),
    /**
     * 转让
     */
    TRANSFER_CHECK_BUTTON("transferCheck", "去复核", "转让复核按钮"),

    TRANSFER_APPROVE_BUTTON("transferApprove", "去审批", "转让，平台审批按钮"),

    TRANSFER_SIGN_BUTTON("transferSign", "去签收", "转让签收按钮"),
    /**
     * 融资按钮
     */
    FINANCE_CHECK_BUTTON("financeCheck", "去复核", "融资复核按钮"),

    FINANCE_APPROVE_BUTTON("financeApprove", "去审批", "融资，平台审批按钮"),

    FINANCE_SIGN_BUTTON("financeSign", "去签署", "融资签署按钮"),
    /**
     * 平台-融资管理，融资列表 修改 按钮
     */
    FINANCE_CREDIT_UPDATE_BUTTON("financeCreditUpdate", "修改", "融资额度修改按钮"),


    ;
    private final String code;
    private final String value;
    private final String description;


    MenuButtonEnum(String code, String value, String description) {
        this.code = code;
        this.value = value;
        this.description = description;
    }

    public static String getValue(String code) {
        for (MenuButtonEnum statusEnum : MenuButtonEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.description;
            }
        }
        return "";
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
